package com.shensi.api.admin.client.customer;

import com.shensi.api.admin.client.fallback.customer.CustomerDialogueAdTemplateClientFallBack;
import com.shensi.api.admin.domian.customer.dto.CustomerDialogueAdTemplateDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerDialogueAdTemplateClientFallBack.class)
@Component
public interface CustomerDialogueAdTemplateClient {

    /**
     * 查询ad列表
     */
    @GetMapping("/customer/dialogue/list")
    public TableDataInfo list(@SpringQueryMap CustomerDialogueAdTemplateDto customerDialogueAdTemplate);

    /**
     * 导出ad列表
     */
    @GetMapping("/customer/dialogue/export")
    public AjaxResult export(@SpringQueryMap CustomerDialogueAdTemplateDto customerDialogueAdTemplate);

    /**
     * 获取ad详细信息
     */
    @GetMapping(value = "/customer/dialogue/{adId}")
    public AjaxResult getInfo(@PathVariable("adId") Long adId);

    /**
     * 新增ad
     */
    @PostMapping("/customer/dialogue")
    public AjaxResult add(@RequestBody CustomerDialogueAdTemplateDto customerDialogueAdTemplate);

    /**
     * 修改ad
     */
    @PutMapping("/customer/dialogue")
    public AjaxResult edit(@RequestBody CustomerDialogueAdTemplateDto customerDialogueAdTemplate);

    /**
     * 删除ad
     */
    @DeleteMapping("/customer/dialogue/{adIds}")
    public AjaxResult remove(@PathVariable("ids") Long[] adIds);
}
